<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>GAG-NESHA - School of Gag and Fun</title>
    <link id="cssfile" href="style1.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript" src="home.js"></script>
	<script type="text/javascript" src="csspopup.js"></script>
	<script type="text/javascript" src="post.js"></script>
	<script type="text/javascript" src="content.js"></script>
	<script type="text/javascript" src="list-content.js"></script>
  </head>
  <body>
    <!-- Header -->
		  <div id="blanket" style="display:none;"></div>
	      <div id="popUpDiv" style="display:none;">
			Username: <input type="text" name="uname"/> <br />
			Password: <input type="password" name="pass"/> <br />
			<input class="button" id="loginButton" type="button" value="Log in"/> <br />
			<a href="register.php" >Don't have account? Register Now</a> <br />
			<a id="closelogin" href="#" onclick="show()">CloseBox</a> <br />
		  </div>
	<div id="header">
	  <div id="logo">
	    <a href="index.php">
		<img class="logoimage" src="logo.png" alt="Logo"/>
		</a>
	  </div>
	  <div id="judul">
		  <h1>Gag-Nesha</h1>
		  <p>School of Gag and Fun</p>
      </div>
	  <div id="searchbox">
		<form method="get" action="search.php">
			<input id="search" type="text" name="q" value="Search here..." />
			<input class="button" type="submit" value="Search"/><br />
			<span id="filtertext">Filter:</span>
			<input type="radio" name="search_type" value="all" checked/> all
			<input type="radio" name="search_type" value="username" /> username
			<input type="radio" name="search_type" value="content" /> content
		</form>
	  </div>
      <div id="menu">
        <ul>
		  <li><a href="index.php">Home</a></li>
          <li><a href="list-content.php">Content</a></li>
		  <li><a href="post.php">Post</a></li>
		  <?php			
			if(isset($_SESSION["userid"])) {
				echo "<li><a href='profile.php?id=$_SESSION[userid]'>Hi, $_SESSION[uname]</a></li>";
				echo "<li><img class='avatar' src='avatar/$_SESSION[avatar]' alt='avatar' width=30px height=30px /></li>";
				echo "<li><a href='logout.php'>Log Out</a></li>";
			} else {
				echo "<li>";
				?>
				<a id= "login" href="#" onclick="show()">Register/Log In</a>
				<?php
				echo "</li>";
			}
		  ?>
		  <!--<li>
			<a href="javascript:popup('popUpDiv')">Log In</a>
		  </li>-->
		  <!--<li><a href="javascript:popup('popUpDiv')">Log in</a></li>-->
		  
		  <!--
		  <li>Ganti tema: 
		    <select name="tema">
			  <option value="pilih">Pilih tema...</option>
			  <option value="klasik">Metalik</option>
			  <option value="pelangi">Pelangi</option>
		    </select>
		  </li>
		  -->
        </ul>
      </div>
    </div>